<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      libpwquality-1.4.2
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;4.&nbsp;Security
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="liboauth.html" title=
          "liboauth-1.0.3">Prev</a>
          <p>
            liboauth-1.0.3
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="mitkrb.html" title=
          "MIT Kerberos V5-1.18">Next</a>
          <p>
            MIT Kerberos V5-1.18
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="security.html" title=
          "Chapter&nbsp;4.&nbsp;Security">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="libpwquality" name="libpwquality"></a>libpwquality-1.4.2
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to libpwquality
        </h2>
        <p>
          The <span class="application">libpwquality</span> package provides
          common functions for password quality checking and also scoring
          them based on their apparent randomness. The library also provides
          a function for generating random passwords with good
          pronounceability.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (HTTP): <a class="ulink" href=
                "https://github.com/libpwquality/libpwquality/releases/download/libpwquality-1.4.2/libpwquality-1.4.2.tar.bz2">
                https://github.com/libpwquality/libpwquality/releases/download/libpwquality-1.4.2/libpwquality-1.4.2.tar.bz2</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: ae6e61fc33f5dac0de5e847eb7520d71
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 416 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 4.1 MB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: less than 0.1 SBU
              </p>
            </li>
          </ul>
        </div>
        <h3>
          libpwquality Dependencies
        </h3>
        <h4>
          Required
        </h4>
        <p class="required">
          <a class="xref" href="cracklib.html" title=
          "CrackLib-2.9.7">CrackLib-2.9.7</a>
        </p>
        <h4>
          Recommended
        </h4>
        <p class="recommended">
          <a class="xref" href="linux-pam.html" title=
          "Linux-PAM-1.3.1">Linux-PAM-1.3.1</a>
        </p>
        <h4>
          Optional
        </h4>
        <p class="optional">
          <a class="xref" href="../general/python2.html" title=
          "Python-2.7.17">Python-2.7.17</a>
        </p>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/libpwquality">http://wiki.linuxfromscratch.org/blfs/wiki/libpwquality</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of libpwquality
        </h2>
        <p>
          Install <span class="application">libpwquality</span> by running
          the following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr                  \
            --disable-static               \
            --with-securedir=/lib/security \
            --with-python-binary=python3 &amp;&amp;
make</kbd>
</pre>
        <p>
          This package does not come with a test suite.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class=
          "parameter"><code>--with-python-binary=python3</code></em>: This
          parameter gives the location of the <span class=
          "application">Python</span> binary. The default is <em class=
          "parameter"><code>python</code></em>, and requires <a class="xref"
          href="../general/python2.html" title=
          "Python-2.7.17">Python-2.7.17</a>.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring libpwquality
        </h2>
        <p>
          <span class="application">libpwquality</span> is intended to be a
          functional replacement for the <code class=
          "filename">pam_cracklib.so</code> module with additional options.
          To replace the <code class="filename">pam_cracklib.so</code> module
          with the <code class="filename">pam_pwquality.so</code> module,
          execute the following commands as the <code class=
          "systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">mv /etc/pam.d/system-password{,.orig} &amp;&amp;
cat &gt; /etc/pam.d/system-password &lt;&lt; "EOF"
<code class="literal"># Begin /etc/pam.d/system-password

# check new passwords for strength (man pam_pwquality)
password  required    pam_pwquality.so   authtok_type=UNIX retry=1 difok=1 \
                                         minlen=8 dcredit=0 ucredit=0 \
                                         lcredit=0 ocredit=0 minclass=1 \
                                         maxrepeat=0 maxsequence=0 \
                                         maxclassrepeat=0 geoscheck=0 \
                                         dictcheck=1 usercheck=1 \
                                         enforcing=1 badwords="" \
                                         dictpath=/lib/cracklib/pw_dict
# use sha512 hash for encryption, use shadow, and use the
# authentication token (chosen password) set by pam_pwquality
# above (or any previous modules)
password  required    pam_unix.so        sha512 shadow use_authtok

# End /etc/pam.d/system-password</code>
EOF
</kbd>
</pre>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Programs:</strong>
              <span class="segbody">pwscore and pwmake</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">pam_pwquality.so and
              libpwquality.so</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directories:</strong>
              <span class="segbody">None</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="pwmake" name="pwmake"></a><span class=
                    "term"><span class=
                    "command"><strong>pwmake</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a simple configurable tool for generating random and
                    relatively easily pronounceable passwords.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pwscore" name="pwscore"></a><span class=
                    "term"><span class=
                    "command"><strong>pwscore</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a simple tool for checking quality of a password.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="libpwquality-lib" name=
                    "libpwquality-lib"></a><span class="term"><code class=
                    "filename">libpwquality.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    contains API functions for checking the password quality.
                  </p>
                </td>
              </tr>
              <tr>
                <td>
                  <p>
                    <a id="pam_pwquality" name=
                    "pam_pwquality"></a><span class="term"><code class=
                    "filename">pam_pwquality.so</code></span>
                  </p>
                </td>
                <td>
                  <p>
                    is a <span class="application">Linux PAM</span> module
                    used to perform password quality checking.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2015-09-25 08:48:24 -0500
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="liboauth.html" title=
          "liboauth-1.0.3">Prev</a>
          <p>
            liboauth-1.0.3
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="mitkrb.html" title=
          "MIT Kerberos V5-1.18">Next</a>
          <p>
            MIT Kerberos V5-1.18
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="security.html" title=
          "Chapter&nbsp;4.&nbsp;Security">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
